
<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: module parse_pathway</title>
</head><body bgcolor="#f0f0f8">

<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong>parse_pathway</strong></big></big></font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/home/lc6/pygenome/src/parse_pathway.py">/home/lc6/pygenome/src/parse_pathway.py</a></font></td></tr></table>
    <p></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#aa55cc">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#fffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
    
<tr><td bgcolor="#aa55cc"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="Image.html">Image</a><br>
<a href="ImageDraw.html">ImageDraw</a><br>
</td><td width="25%" valign=top><a href="StringIO.html">StringIO</a><br>
<a href="logging.html">logging</a><br>
</td><td width="25%" valign=top><a href="urllib.html">urllib</a><br>
</td><td width="25%" valign=top></td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ee77aa">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
    
<tr><td bgcolor="#ee77aa"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl>
<dt><font face="helvetica, arial"><a href="__builtin__.html#object">__builtin__.object</a>
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="parse_pathway.html#Edge">Edge</a>
</font></dt><dt><font face="helvetica, arial"><a href="parse_pathway.html#EdgeBuilder">EdgeBuilder</a>
</font></dt></dl>
</dd>
</dl>
 <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="Edge">class <strong>Edge</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
    
<tr><td bgcolor="#ffc8d8"><tt>&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="Edge-__init__"><strong>__init__</strong></a>(self, poly_path, title, soup_node)</dt></dl>

<dl><dt><a name="Edge-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>

<dl><dt><a name="Edge-add_hit"><strong>add_hit</strong></a>(self, read)</dt></dl>

<dl><dt><a name="Edge-add_spec"><strong>add_spec</strong></a>(self, spec)</dt></dl>

<dl><dt><a name="Edge-clear"><strong>clear</strong></a>(self)</dt></dl>

<dl><dt><a name="Edge-diversity"><strong>diversity</strong></a>(self)</dt></dl>

<dl><dt><a name="Edge-number_of_hit"><strong>number_of_hit</strong></a>(self)</dt></dl>

<dl><dt><a name="Edge-number_of_spec"><strong>number_of_spec</strong></a>(self)</dt></dl>

<dl><dt><a name="Edge-to_html"><strong>to_html</strong></a>(self, value)</dt></dl>

<dl><dt><a name="Edge-update_avg"><strong>update_avg</strong></a>(self, distance)</dt></dl>

<dl><dt><a name="Edge-update_max"><strong>update_max</strong></a>(self, distance)</dt></dl>

<hr>
Data and other attributes defined here:<br>
<dl><dt><strong>__dict__</strong> = &lt;dictproxy object&gt;<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dl>

<dl><dt><strong>__weakref__</strong> = &lt;attribute '__weakref__' of 'Edge' objects&gt;<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;<a href="__builtin__.html#object">object</a>&nbsp;(if&nbsp;defined)</tt></dl>

</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="EdgeBuilder">class <strong>EdgeBuilder</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt>Build&nbsp;title-&gt;edge&nbsp;map&nbsp;from&nbsp;a&nbsp;beautifulsoup&nbsp;<a href="__builtin__.html#object">object</a><br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="EdgeBuilder-__init__"><strong>__init__</strong></a>(self)</dt></dl>

<dl><dt><a name="EdgeBuilder-process_html"><strong>process_html</strong></a>(self, edges)</dt><dd><tt>Return&nbsp;title-&gt;edges&nbsp;map&nbsp;and&nbsp;edges&nbsp;set<br>
soup:&nbsp;is&nbsp;the&nbsp;soup&nbsp;<a href="__builtin__.html#object">object</a>&nbsp;generated&nbsp;from&nbsp;the&nbsp;orgianl&nbsp;html&nbsp;source&nbsp;code</tt></dd></dl>

<dl><dt><a name="EdgeBuilder-split_title"><strong>split_title</strong></a>(self, str)</dt><dd><tt>Split&nbsp;the&nbsp;title&nbsp;by&nbsp;comma<br>
&gt;&gt;&gt;&nbsp;e=<a href="#EdgeBuilder">EdgeBuilder</a>()<br>
&gt;&gt;&gt;&nbsp;e.<a href="#EdgeBuilder-split_title">split_title</a>("K00889&nbsp;(E2.7.1.68,&nbsp;PIP5K),&nbsp;K01099,&nbsp;R03469,&nbsp;R04404")<br>
['K00889',&nbsp;'K01099',&nbsp;'R03469',&nbsp;'R04404']</tt></dd></dl>

<hr>
Data and other attributes defined here:<br>
<dl><dt><strong>__dict__</strong> = &lt;dictproxy object&gt;<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dl>

<dl><dt><strong>__weakref__</strong> = &lt;attribute '__weakref__' of 'EdgeBuilder' objects&gt;<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;<a href="__builtin__.html#object">object</a>&nbsp;(if&nbsp;defined)</tt></dl>

</td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#eeaa77">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
    
<tr><td bgcolor="#eeaa77"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl><dt><a name="-color_bar"><strong>color_bar</strong></a>(im, color, val, title)</dt></dl>
 <dl><dt><a name="-draw_image"><strong>draw_image</strong></a>(im, marked, method, max_val)</dt><dd><tt>Draw&nbsp;image&nbsp;using&nbsp;a&nbsp;method&nbsp;in&nbsp;<a href="#Edge">Edge</a>&nbsp;<a href="__builtin__.html#object">object</a><br>
im:&nbsp;Image<br>
marked:&nbsp;Marked&nbsp;edge<br>
method:&nbsp;a&nbsp;string&nbsp;for&nbsp;method&nbsp;name<br>
max_val:&nbsp;max&nbsp;value&nbsp;for&nbsp;makred&nbsp;edge</tt></dd></dl>
 <dl><dt><a name="-draw_image_proportion"><strong>draw_image_proportion</strong></a>(im, marked, method, max_val)</dt><dd><tt>Draw&nbsp;image&nbsp;using&nbsp;a&nbsp;method&nbsp;in&nbsp;<a href="#Edge">Edge</a>&nbsp;<a href="__builtin__.html#object">object</a><br>
Color&nbsp;the&nbsp;edge&nbsp;by&nbsp;proportion<br>
im:&nbsp;Image<br>
marked:&nbsp;Marked&nbsp;edge<br>
method:&nbsp;a&nbsp;string&nbsp;for&nbsp;method&nbsp;name<br>
max_val:&nbsp;max&nbsp;value&nbsp;for&nbsp;makred&nbsp;edge</tt></dd></dl>
 <dl><dt><a name="-mark_edge"><strong>mark_edge</strong></a>(read_lst, edge_map)</dt><dd><tt>Read&nbsp;file&nbsp;and&nbsp;Mark&nbsp;edge&nbsp;by&nbsp;reads</tt></dd></dl>
 <dl><dt><a name="-mark_edge_by_div"><strong>mark_edge_by_div</strong></a>(file, title)</dt><dd><tt>Read&nbsp;file&nbsp;and&nbsp;mark&nbsp;edge&nbsp;by&nbsp;diversity</tt></dd></dl>
 <dl><dt><a name="-mark_edge_spec"><strong>mark_edge_spec</strong></a>(read_lst, edge_map)</dt><dd><tt>Read&nbsp;file&nbsp;and&nbsp;mark&nbsp;edge&nbsp;by&nbsp;species&nbsp;count</tt></dd></dl>
 <dl><dt><a name="-read_div_file"><strong>read_div_file</strong></a>(file)</dt><dd><tt>Read&nbsp;spediv&nbsp;file&nbsp;and&nbsp;return&nbsp;a&nbsp;{K&nbsp;value-&gt;&nbsp;diversity}&nbsp;map</tt></dd></dl>
 <dl><dt><a name="-val_to_rgb"><strong>val_to_rgb</strong></a>(val)</dt><dd><tt>Return&nbsp;the&nbsp;RGB&nbsp;value<br>
val:&nbsp;range&nbsp;0-100&nbsp;(blue&nbsp;to&nbsp;red)</tt></dd></dl>
</td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#55aa55">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
    
<tr><td bgcolor="#55aa55"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><strong>builder</strong> = &lt;parse_pathway.EdgeBuilder object&gt;<br>
<strong>g_edge_set</strong> = set([K00691,2.4.1.8,R01555:0, K00691,2.4.1.8,R01555:0, TPSD5_ABIGR,4.2.3.-,R08540:0, Q675L0_PICAB,4.2.3.-,R08542:0, Q675L0_PICAB,4.2.3.-,R08542:0, Q675L0_PICAB,4.2.3.-,R08542:0, ...])<br>
<strong>path</strong> = &lt;open file '../show_pathway.htm', mode 'r'&gt;<br>
<strong>polys</strong> = [&lt;area shape="poly" coords="294,928,266,928,266,...13), 6.2.1.1, 6.2.1.13, R00235, R00229"&gt;
&lt;/area&gt;]<br>
<strong>soup</strong> = &lt;html&gt;&lt;head&gt;
&lt;meta http-equiv="content-type" con...id="poplay" class="poplay"&gt;
&lt;/div&gt;&lt;/body&gt;&lt;/html&gt;
<br>
<strong>title_map</strong> = {u'.1.1.1.100': set([K00665,K00667,K11533,K00059,2.3.1.85,2.3.1.86,2.3.1.-,.1.1.1.100,R04566:0]), u'1': set([K00248,K09478,K11410,K11538,K00249,1.3.99.2,1,3.99.3,1.3.99.12,1.3.99.-,R02661:0]), u'1.-.-.-': set([K04036,1.3.1.75,1.-.-.-,1.3.1.75,R06271,R06896:0, K00595,2.1.1.132,1.-.-.-,R05149:0, K00595,2.1.1.132,1.-.-.-,R05149:0, K00595,2.1.1.132,1.-.-.-,R05149:0, K00595,2.1.1.132,1.-.-.-,R05149:0, K00595,2.1.1.132,1.-.-.-,R05149:0]), u'1.1.-.-': set([K00120,1.1.-.-,R06885:0, K00001,K00121,K11146,K11147,K11148,K11149,K11150...53,K11154,1.1.1.1,1.1.1.-,1.1.-.-,R02124,R08379:0]), u'1.1.1.-': set([K00100,1.1.1.-,R05351:0, K00100,1.1.1.-,R05351:0, K00100,1.1.1.-,R05351:0, K07538,1.1.1.-,R05581:0, K00001,K00121,K11146,K11147,K11148,K11149,K11150...53,K11154,1.1.1.1,1.1.1.-,1.1.-.-,R02124,R08379:0, K00071,1.1.1.146,1.1.1.-,R02834,R02836:0]), u'1.1.1.1': set([K00001,K00121,K04072,1.1.1.1,R04880:0, K00001,K00121,K04072,1.1.1.1,R04880:0, K00001,K00121,K04072,1.1.1.1,R04880:0, K00001,K00121,K04072,1.1.1.1,R05233:0, K00001,K00121,K04072,1.1.1.1,R05234:0, K00001,K00121,K11146,K11147,K11148,K11149,K11150...53,K11154,1.1.1.1,1.1.1.-,1.1.-.-,R02124,R08379:0, ...]), u'1.1.1.10': set([K03331,1.1.1.10,R01904:0]), u'1.1.1.100': set([K00665,K00667,K11533,K00059,2.3.1.85,2.3.1.86,2.3.1.-,1.1.1.100,R04543:0, K00665,K00667,K11533,K00059,2.3.1.85,2.3.1.86,2.3.1.-,1.1.1.100,R04964:0, K00665,K00667,K11533,K00059,2.3.1.85,2.3.1.86,2.3.1.-,1.1.1.100,R04534:0, K00665,K00667,K11533,K00059,2.3.1.85,2.3.1.86,2.3.1.-,1.1.1.100,R04536:0, K00665,K00667,K11533,K00059,2.3.1.85,2.3.1.86,2.3.1.-,1.1.1.100,R04953:0, K00665,K00667,K11533,K00059,2.3.1.85,2.3.1.86,2.3.1.-,1.1.1.100,R04533:0]), u'1.1.1.101': set([K06123,1.1.1.101,R02756:0, K06123,1.1.1.101,R04360:0]), u'1.1.1.102': set([K04708,1.1.1.102,R02978:0]), ...}</td></tr></table>
</body></html>